var t = getApp();

Page({
    data: {
        order_id: "",
        api: "",
        showQrcode: !1,
        customForm: []
    },
    onLoad: function(t) {
        t.order_id && this.setData({
            order_id: t.order_id
        }), t.api && this.setData({
            api: t.api
        });
    },
    onReady: function() {},
    onShow: function() {
        this._initData(), this._verification();
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    _initData: function() {
        this.setData({
            showQrcode: !1
        });
    },
    _verification: function() {
        var o = this, a = t.getNetAddresss(this.data.api);
        a += "&order_id=" + this.data.order_id, t._getNetWork({
            url: a,
            success: function(t) {
                var a = t.data, i = [];
                1 == a.result ? (a.data.custom && (i = a.data.custom.form), o.setData({
                    qrcode: a.data.miQrCodeUrl,
                    showQrcode: !0,
                    customForm: i
                })) : wx.showToast({
                    title: a.msg,
                    icon: "none",
                    duration: 1500,
                    success: function() {
                        setTimeout(function() {
                            wx.navigateBack({
                                delta: 1
                            });
                        }, 1500);
                    }
                });
            },
            fail: function(t) {
                wx.showToast({
                    icon: "none",
                    title: t.msg,
                    duration: 1500
                }), wx.navigateBack({
                    delta: 1
                });
            }
        });
    }
});